package com.rmt.www.daoImpl;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.rmt.www.vo.Project;
import com.rmt.www.vo.User;


public class ProjectRowMapper implements RowMapper {


	public Object mapRow(ResultSet rs, int index) throws SQLException {
		Project project = new Project();
		project.setPid(rs.getInt("pid"));
		project.setTitle(rs.getString("title"));
		project.setCreatorId(rs.getInt("creatorId"));
		project.setTime(rs.getTimestamp("time"));
		project.setDescription(rs.getString("description"));
		if (rs.getByte("isbaselinecreated") == 0) 
		{
			project.setIsbaselinecreated(false);
		}
		else 
		{
			project.setIsbaselinecreated(true);
		}
		return project;
	}
 

}
